<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('teachingTransfer')} > ${i18n.getMessage('list')}">
	<a href="#" onclick="cc('offering/showAddTeachingSwitch.sgt?offeringId=${(offering.id)!}')">${i18n.getMessage('add')}</a>
	- <a href="#" onclick="cc('offering/showInfoOffering.sgt?id=${(offering.id)!}')">${i18n.getMessage('offering')}</a>
</@showTitle>

<br/>

<#assign switchs = offering.getTeachingSwitchs()>

<#if (switchs.size() > 0)>
	${request.setAttribute('records', switchs)}
	<@display.table id="listTable" name="records" >
		<@display.column title="${i18n.getMessage('day')}" style="text-align:center;width:50px">${(DateUtil.getDateOfWeekAsString(listTable.mainDay))!}</@display.column>
		<@display.column title="${i18n.getMessage('teacher')}" style="width:150px"><a href="#" onclick="cc('teacher/showInfoTeacher.sgt?id=${listTable.mainTeacher.id!}')">${(listTable.mainTeacher.fullName)!}<a/></@display.column>
		<@display.column title="${i18n.getMessage('fromDate')}" style="width:70px">${(listTable.fromDate?date)!}</@display.column>
		<@display.column title="${i18n.getMessage('toDate')}" style="width:70px">${(listTable.toDate?date)!}</@display.column>
		<@display.column title="${i18n.getMessage('inplaceTeacher')}" style="text-align:center"><a href="#" onclick="cc('teacher/showInfoTeacher.sgt?id=${listTable.inplaceTeacher.id!}')">${(listTable.inplaceTeacher.fullName)!}</a></@display.column>
		<@display.column title="${i18n.getMessage('comment')}" style="width:150px"><textarea disabled style="width:95%;height:50px;background-color:#FFFAFA">${(listTable.comment)!}</textarea></@display.column>
		<@display.column title="${i18n.getMessage('edit')}" style="width:25px;text-align:center"><img src="images/edit.gif" onclick="cc('offering/showEditTeachingSwitch.sgt?id=${listTable.id}')" style="cursor:pointer"/></@display.column>
		<@display.column title="${i18n.getMessage('delete')}" style="width:40px;text-align:center"><img src="images/delete.gif" onclick="if(confirm('${i18n.getMessage('dialog.delete')}')) { cc('offering/deleteTeachingSwitch.sgt?id=${listTable.id}&offeringId=${offering.id}'); }" style="cursor:pointer"/></@display.column>
	</@display.table>
</#if>

<br/><br/>
